package com.kanavi.dataAccess.config;

import com.kanavi.dataAccess.entity.SysDataScope;
import lombok.extern.slf4j.Slf4j;
import net.sf.jsqlparser.statement.select.PlainSelect;

import java.util.Map;

@Slf4j
public class DefaultApiAuthParamsParser extends AbstractApiAuthParamsParser {
  @Override
  public String parse(PlainSelect plainSelect, SysDataScope dataScope, Map<String, Object> params) {
    log.info("defaultParamsParser");
    String sqlPart =
        dataScope.getTableName()
            + "."
            + dataScope.getColumnName()
            + " "
            + dataScope.getExpression();
    return sqlPart;
  }
}
